home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 August: Tool Chest / Dev.CD Aug 00 TC Disk 2.toast / pc / sample code / networking / pgpuam / sources / tmempgpkey.h < prev    next >
Encoding:
Text File  |  2000-06-23  |  1.5 KB  |  56 lines

  1. //    TMemPGPkey.h -  In Memory PGP Key Object  
  2. // 
  3. // 
  4. // Apple Macintosh Developer Technical Support
  5. // Written by:  Vinnie Moscaritolo
  6. //
  7. //  Copyright (work in progress)  Apple Computer, Inc All rights reserved.
  8. //
  9. // You may incorporate this sample code into your applications without
  10. // restriction, though the sample code has been provided "AS IS" and the
  11. // responsibility for its operation is 100% yours.  However, what you are
  12. // not permitted to do is to redistribute the source as "DSC Sample Code"
  13. // after having made changes. If you're going to re-distribute the source,
  14. // we require that you make it clear in the source that the code was
  15. // descended from Apple Sample Code, but that you've made changes.
  16. // 
  17.  
  18. #ifndef _H_TASIPPGPKEY
  19. #define _H_TASIPPGPKEY
  20.  
  21. #include <OpenTransport.h> 
  22.  
  23. #include "TPGPkey.h"
  24.  
  25. // ---------------------------------------------------------------------------
  26. //     TASIPPGPkey - PGP Key Object 
  27. // ---------------------------------------------------------------------------
  28. // 
  29. class TMemPGPkey : public  TPGPkey
  30. {
  31.  public: 
  32.  
  33.      void*     operator new     (size_t size)         { return ::OTAllocMem (size); };
  34.      void     operator delete (void* deadObject)     { ::OTFreeMem(deadObject); };
  35.  
  36. //     CONSTRUCTORS AND DESTRUCTORS
  37.              TMemPGPkey()    :
  38.                          fKeySet(kInvalidPGPKeySetRef) {};
  39.  
  40.     virtual  ~TMemPGPkey();            
  41.  
  42. // MAIN INTERFACE
  43.     virtual void Initialize(void* buf, PGPSize bufSize );     // initialize
  44.     
  45.  
  46. // ACCESSSORS
  47.      
  48.  
  49. // PRIVATE FIELDS
  50. protected:
  51.      PGPKeySetRef fKeySet;
  52.  
  53.  };
  54.  
  55. #endif
  56.